<div class="container">
<!--幻灯片开始-->
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
    <!-- Indicators -->
    <ol class="carousel-indicators">
        <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
        <li data-target="#carousel-example-generic" data-slide-to="1"></li>
        <li data-target="#carousel-example-generic" data-slide-to="2"></li>
    </ol>

    <!-- Wrapper for slides -->
    <div class="carousel-inner">
        <div class="item active">
            <img src="./Home/assets/images/img4.jpg" class="img-responsive" alt="Apple iPhone 5S">

            <div class="carousel-caption">
                <h3>Apple iPhone 5S</h3>

            </div>
        </div>
        <div class="item">
            <img src="./Home/assets/images/img2.jpg" class="img-responsive" alt="Samsung Galaxy Note 3">

            <div class="carousel-caption">
                <h3>Samsung Galaxy Note 3</h3>

            </div>
        </div>
        <div class="item">
            <img src="./Home/assets/images/img3.jpg" class="img-responsive" alt="Apple iPhone 5S">

            <div class="carousel-caption">
                <h3>Sony Xperia Z1</h3>

            </div>
        </div>
    </div>

    <!-- Controls -->
    <a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
        <span class="glyphicon glyphicon-chevron-left"></span>
    </a>
    <a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
        <span class="glyphicon glyphicon-chevron-right"></span>
    </a>
</div>
<!--幻灯片结束-->
 <div class="row row-offcanvas row-offcanvas-right">
        <div class="col-xs-12 col-sm-9">
            <div class="row text-center">
                <div class="col-xs-12 col-lg-12 mlist">



<?php 
//var_dump($data['video']);
                    foreach ($data['type'] as $row1) {
                    echo    '<h2>'.$row1['typename'].
                     '</h2>
                    <ul class="list-inline row text-center">';
                     
                
                        foreach ($data['video'] as $row2)
                         {
                            if($row2['tid']==$row1['tid'])
                            {
                               

                                echo '<li class="col-xs-4 col-sm-3"><img src="./upload1/'.$row2['pic'].'" class="responsive img-thumbnail" />';
                                echo '<p><a href="index.php?c=detail&m=detail&id='.$row2['vid'].'">'.$row2['videoname'].'</a></p></li>';
                            }
                        }
                        echo '</ul>';
                        
                        
                 echo '<p><a class="btn btn-default" href="index.php?c=show&m=show&id='.$row1['tid'].'" role="botton">更多
                 &raquo;</a></p>';
             }
                                                     
                 ?>

</div>
</div>
</div>



<div class="col-xs-6 col-sm-3 sidebar-offcanvas" >
            <div class="list-group text-center" id="sidebar">
                <h2 style="color:white;" >点击排行</h2>
                <ul class="list-inline row text-center">
                <?php             
               // var_dump($data['hittimes']);
            foreach ($data['hittimes'] as $row2)
               {
                            
        echo '<li class="col-xs-4 col-sm-3"><img src="./upload1/'.$row2['pic'].'" class="responsive img-thumbnail" />';
        echo '<p><a href="index.php?c=detail&m=detail&id='.$row2['vid'].'">'.$row2['videoname'].'</a></p>';
                        }
                     
                 ?>
                 </ul>
                 
            </div>
        </div>

<div class="col-xs-6 col-sm-3 sidebar-offcanvas" >
            <div class="list-group text-center" id="sidebar">
                <h2 style="color:white;" >下载排行</h2>
                <ul class="list-inline row text-center">
                <?php             

            foreach ($data['downtimes'] as $row3)
               {
                            
        echo '<li class="col-xs-4 col-sm-3"><img src="./upload1/'.$row2['pic'].'" class="responsive img-thumbnail" />';
        echo '<p><a href="index.php?c=detail&m=detail&id='.$row2['vid'].'">'.$row2['videoname'].'</a></p>';
                        }
                     
                 ?>
                 </ul>
                 
            </div>
        </div>

            <!--/row-->
        </div>
        <!--/.col-xs-12.col-sm-9-->

</div>